import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(name)s-%(levelno)s',filename='log.txt')
def send_mail(a):
    mail=yagmail.SMTP(user='2484985196@qq.com',password='plsayrrnkvudecif',host='smtp.qq.com')
    mail.send(to='2484985196@qq.com',subject='测试报告',contents='测试报告',attachments=a)